services:
  news_db:
    image: mongo:latest
    restart: always
    ports:
      - '27017:27017'

  api:
    build:
      ./api
    depends_on:
      - news_db
    env_file:
      - ./api/.env
    ports:
      - '5050:5050'

  web:
    build:
      ./web
    ports:
      - '3000:3000'
    depends_on:
      - news_db
      - api